home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / NeXTmille / Source / SafetyStacksView.h < prev    next >
Text File  |  1990-12-08  |  2KB  |  55 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "CardHolder.h"
  5. #import    "CardView.h"
  6. #import    <appkit/graphics.h>
  7. #import    <objc/List.h>
  8.  
  9.  
  10. // This object holds the safety cards for each player.  It shows
  11. //    wheather the cards are played as safeties or coup fouree.  Safeties are 
  12. //    displayed vertically a is the other cards but for coup fourees the 
  13. //    safeties are rotated.
  14.  
  15.  
  16. @interface SafetyStacksView:CardHolder
  17. {
  18.  
  19.                                                 // These lists hold the card views that are either safeties
  20.                                                 //    or coup fouree.  These are seperated on these lists to ease
  21.                                                 //    their management by this object.
  22.                                                 // Note that cards placed on the coup fouree list are
  23.                                                 //    resized and their views rotated.
  24.     List    *safetyList,
  25.             *coupFoureeList;
  26.                                                 //    These values hold the amount of offset within the view that 
  27.                                                 //    each card is given as it is added to the view.
  28.     NXCoord    safetyOffset,
  29.             coupFoureeOffset;
  30. }
  31.  
  32.                                                 // This method exists so that the safety card offsets can
  33.                                                 //    be calculated.
  34. + newFrame:( const NXRect * )frameRect;
  35. - free;
  36.                                                 // These methods add safty cards to a safty view.
  37.                                                 // Safties--normal safties--are displayed right side up with
  38.                                                 //    overlap for multiple safties.
  39.                                                 // Coup Fouree are displayed horizontally with overlap for
  40.                                                 //    multiple cards.
  41.                                                 // The sender variable is used by this object.  Here, when a 
  42.                                                 //    card is added to the safety view, the sender is queried
  43.                                                 //    to determine if the card is coup fouree.
  44.                                                 // A bit of warning:
  45.                                                 //    When cards are added or removed
  46. - addCard:( CardView * )aCard :sender;
  47. - removeCard:( CardView * )aCard :sender;    
  48.                                                 // Overrides the superclass methods.  They remove a card(s) from the subview
  49.                                                 //    list and send them to some other object.
  50. - sendCard:( CardView * )aCard to:anObject;
  51. - sendAllCardsTo:anObject;
  52.  
  53.  
  54. @end
  55.